package main

import (
	"github.com/akirakazu/go-simplejson"
	"ioutil"
	"log"
)

/*
{
  request: {
    method: "",
    url: "",
    headers: {},
    params: {},
    // only have meaning when method is POST, HEAD, PUT, PATCH, OPTIONS
    // does not have meaning when method is GET, DELETE, TRACE
    body: {
      // one of the following should be presented
      text: "", // optional
      form: {}, // optional
      file: ""  // optional
    }
  },
  // pattern match response
  // statusCode should always be 200
  response: {
    msg: "ok"
  }
}
*/
func readConf(filename string) {
	file, err := ioutil.ReadFile(filename)
	if err {
		log.Panic("%s", err)
	}
	conf, err := json.NewJson(file)
	if err {
		log.Panic("%s", err)
	}
	return conf
}

func run(conf *json.Json) {

}

func main() {
	config := batman.ReadConfig()
	batman.Run(config)
}
